﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
             xmlns:ctrls="clr-namespace:SBPweb.PROvibe.Client.Framework.Controls;assembly=SBPweb.PROvibe.Client.Framework.Controls"
             x:Class="SBPweb.PROvibe.Client.Modules.Themes.BlueTheme"
             >

    <Storyboard x:Key="ButtonEnter" AutoReverse="False">
        <DoubleAnimation
            Storyboard.TargetProperty="Opacity"
            Duration="0:0:0.05"
            From="0.0"
            To="0.5"
        />
    </Storyboard>

    <Storyboard x:Key="ButtonLeave" AutoReverse="False">
        <DoubleAnimation
            Storyboard.TargetProperty="Opacity"
            Duration="0:0:0.3"
            From="0.5"
            To="0.0"
        />
    </Storyboard>

    <Storyboard x:Key="ContainerEnter" AutoReverse="False">
        <DoubleAnimation
            Storyboard.TargetProperty="Opacity"
            Duration="0:0:0.1"
            From="0.0"
            To="0.1"
        />
    </Storyboard>

    <Storyboard x:Key="ContainerLeave" AutoReverse="False">
        <DoubleAnimation
            Storyboard.TargetProperty="Opacity"
            Duration="0:0:0.3"
            From="0.1"
            To="0.0"
        />
    </Storyboard>

    <Storyboard x:Key="ContainerShow" AutoReverse="False">
        <DoubleAnimation
            Storyboard.TargetProperty="Opacity"
            Duration="0:0:0.3"
            From="0.0"
            To="1.0"
        />
    </Storyboard>

    <Storyboard x:Key="ContainerHide" AutoReverse="False">
        <DoubleAnimation
            Storyboard.TargetProperty="Opacity"
            Duration="0:0:0.3"
            From="1.0"
            To="0.0"
        />
    </Storyboard>
    
    <Style x:Key="NormalButton" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border Name="ButtonBorder" CornerRadius="3" BorderThickness="1" BorderBrush="#FFFFFF">
                        <Grid x:Name="ButtonGrid" MinWidth="15" Cursor="Hand" MouseEnter="NormalButton_MouseEnter" MouseLeave="NormalButton_MouseLeave">
                            <Rectangle Fill="#0077AA" Opacity="0.5" Grid.RowSpan="2" RadiusX="3" RadiusY="3" />
                            <Rectangle x:Name="ButtonRHover" Fill="#AACCFF" Opacity="0.0" Grid.RowSpan="2" RadiusX="3" RadiusY="3" />
                            <ContentControl Content="{TemplateBinding Content}" Background="Transparent" Foreground="#FFFFFF" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NormalContainer" TargetType="ctrls:SmartpartContainer">
        <Setter Property="StoryboardShow" Value="ContainerShow" />
        <Setter Property="StoryboardHide" Value="ContainerHide" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ctrls:SmartpartContainer">
                    <Grid x:Name="SmartpartContainerGrid" Opacity="0.0">
                        <Border Name="SmartpartContainerBorder" CornerRadius="5" BorderThickness="1" BorderBrush="#FFFFFF">
                            <Grid Name="SmartpartContainerContent" Width="Auto" MouseEnter="NormalContainer_MouseEnter" MouseLeave="NormalContainer_MouseLeave">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <Rectangle x:Name="ContainerR" Fill="#0077AA" Opacity="0.5" Grid.RowSpan="2" RadiusX="5" RadiusY="5" />
                                <Rectangle x:Name="ContainerRHover" Fill="#AACCFF" Opacity="0.0" Grid.RowSpan="2" RadiusX="3" RadiusY="3" />
                                <Grid Name="gTitle" Grid.Row="0" Margin="3,3,3,3">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Name="SmartpartContainerTBTitle" TextAlignment="Center" FontWeight="Bold" Foreground="#FFFFFF" Grid.Column="0" Text="..:: {0} ::.." />
                                    <Button Name="SmartpartContainerBClose" Style="{StaticResource NormalButton}" Grid.Column="1" FontFamily="System" Content="x" IsEnabledChanged="Button_IsEnabledChanged" />
                                </Grid>
                                <Grid Name="SmartpartContainerBody" Grid.Row="1" Margin="3,0,3,3">
                                    <ctrls:ContentControl Name="SmartpartContainerContentControl" Content="{TemplateBinding Content}" />
                                </Grid>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NormalContextMenu" TargetType="ctrls:ContextMenu">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ctrls:ContextMenu">
                    <Popup Name="ContextMenuPopup">
                        <Border Name="ContextMenuPopupBorder" CornerRadius="5" BorderThickness="1" BorderBrush="#FFFFFF">
                            <Grid Name="ContextMenuPopupContent" Width="Auto" Cursor="Hand">
                                <Rectangle Fill="#000000" Opacity="0.5" RadiusX="5" RadiusY="5" />
                                <StackPanel MinWidth="160" Margin="3,3,3,3">
                                    <ContentControl Content="{TemplateBinding Content}" />
                                </StackPanel>
                            </Grid>
                        </Border>
                    </Popup>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="BackgroundGrid" TargetType="Grid">
        <Setter Property="Background">
            <Setter.Value>
                <ImageBrush ImageSource="http://download.microsoft.com/download/2/7/8/278FB79D-6EBE-4B89-839C-824C4E0BFCEC/silverlight_dusk1_wide_1400x864.jpg" Stretch="UniformToFill" AlignmentY="Top" />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="LoaderSplash" TargetType="ContentControl">
        <Setter Property="Cursor" Value="Wait" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Row="0" Grid.Column="0" Foreground="#FFFFFF" FontSize="46" FontFamily="Resources/che-dust.ttf#Dust Mites" Text="pro" />
                        <TextBlock Grid.Row="0" Grid.Column="1" Foreground="#ADD3EA" FontSize="46" FontFamily="Resources/che-dust.ttf#Dust Mites" Text="vibe" />
                        <TextBlock Grid.Row="1" Grid.ColumnSpan="2" Foreground="#FFFFFF" FontSize="20" FontFamily="Resources/che-dust.ttf#Dust Mites" Text="loading..." HorizontalAlignment="Center" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ClockFace" TargetType="Ellipse">
        <Setter Property="StrokeThickness" Value="6"/>

        <Setter Property="Fill">
            <Setter.Value>
                <LinearGradientBrush>
                    <GradientStop Offset="0.0" Color="Black"/>
                    <GradientStop Offset="1.0" Color="White"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Stroke">
            <Setter.Value>
                <LinearGradientBrush>
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Offset="0.0" Color="White" />
                        <GradientStop Offset="1.0" Color="Black" />
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MarkersBig" TargetType="Rectangle">
        <Setter Property="Width" Value="3"/>
        <Setter Property="Height" Value="8"/>
        <Setter Property="Fill">
            <Setter.Value>
                <SolidColorBrush Color="White"/>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MarkersSmall" TargetType="Rectangle">
        <Setter Property="Width" Value="1"/>
        <Setter Property="Height" Value="4"/>
        <Setter Property="Fill">
            <Setter.Value>
                <SolidColorBrush Color="White"/>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>